//
//  NearAdderTableViewCell.m
//  Shengzhuli
//
//  Created by FXGuo on 2017/6/5.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "NearAdderTableViewCell.h"
#import <UIImageView+WebCache.h>

@interface NearAdderTableViewCell()

@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
@property (weak, nonatomic) IBOutlet UILabel *nickNameLab;
@property (weak, nonatomic) IBOutlet UILabel *tellLab;
@property (weak, nonatomic) IBOutlet UILabel *distanceLab;


@end

@implementation NearAdderTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(AdderModel *)model
{
    _model = model;
    [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.portraitUrl] placeholderImage:GetImage(@"头像")];
    self.nickNameLab.text = model.nickName;
    if (model.allowStutas == 1) {
        self.tellLab.text = [model.mobilePhone stringByReplacingCharactersInRange:NSMakeRange(3, 4) withString:@"****"];
    }else {
        self.tellLab.text = model.mobilePhone;
    }
    self.distanceLab.text = model.distance;
}

@end
